IF mpjn=0 THEN Zeigerset zx,zy,bldnr :ELSE Mapon bldnralt:bldnr=bldnralt:mpjn=0:PUT ((zx MOD 13)*35+180,(zy MOD 13)*18+1),ob%(0,bi%(fig%(zx,zy))),PRESET
GOTO E
END IF
IF k$=CHR$(13) THEN
DigiSound "Wuhu",428,0
IF (fig%(zx,zy)<>0 AND fig%(zx,zy)<>f%) THEN
beweg%(f%)=beweg%(f%)+1:tza=tza+1
GOSUB gefecht:warten(2):GOSUB groclear
IF mpjn=0 AND freundkill=0 THEN PUT ((zxalt MOD 13)*35+180,(zyalt MOD 13)*18+1),ob%(0,bi%(fig%(zxalt,zyalt))),PSET
RETURN
END IF
IF (bi%(f%)<>8 AND bi%(f%)<>17) OR ((bi%(f%)=8 OR bi%(f%)=17) AND spar%(zx,zy)<>3) THEN
IF (bi%(f%)<>5 AND bi%(f%)<>14) OR ((bi%(f%)=5 OR bi%(f%)=14) AND spar%(zx,zy)<>4) THEN
IF fig%(zx,zy)<>f% THEN beweg%(f%)=beweg%(f%)+1:tza=tza+1
IF mpjn=0 THEN PUT ((zxalt MOD 13)*35+180,(zyalt MOD 13)*18+1),ob%(0,ugrnd%+18),PSET
PUT ((zx MOD 13)*35+180,(zy MOD 13)*18+1),ob%(0,bi%(f%)),PSET
PUT ((zxalt MOD 13)*35+180,(zyalt MOD 13)*18+1),ob%(0,bi%(fig%(zxalt,zyalt))),PSET
END IF
ELSE
PUT ((zxalt MOD 13)*35+180,(zyalt MOD 13)*18+1),ob%(0,bi%(fig%(zxalt,zyalt))),PSET
END IF
GOSUB groclear
RETURN
END IF
IF zgw>=ma%(f%) THEN tsabfr
IF k$=CHR$(28) AND zy>0 THEN
DigiSound "Schritt",428,0
fg%=fig%(zx,zy-1):sr%=spar%(zx,zy-1)
IF (bi%(f%)=6 OR bi%(f%)=15) AND sr%<>4 AND (fg%=0 OR (spieler=0 AND fg%<48 AND wa%(f%)>zgw) OR (spieler=1 AND fg%>47 AND wa%(f%)>zgw)) THEN a
IF (bi%(f%)=5 OR bi%(f%)=14) AND (sr%=4 OR sr%=6) AND wa%(f%)>zgw THEN a
IF (bi%(f%)=8 OR bi%(f%)=17) AND sr%<>3 AND bgl=1 THEN
zgw=0:zx=zxalt:zy=zyalt:bgl=0
IF mpjn=0 THEN Zeigerset zx,zy,bldnr :ELSE Mapon bldnralt:bldnr=bldnralt:mpjn=0:PUT ((zx MOD 13)*35+180,(zy MOD 13)*18+1),ob%(0,bi%(fig%(zx,zy))),PRESET
GOTO E
END IF
IF (bi%(f%)=8 OR bi%(f%)=17) AND sr%=3 AND wa%(f%)>zgw THEN a
IF sr%<>1 AND sr%<>3 AND sr%<>4 AND (fg%=0 OR (spieler=0 AND fg%<48 AND wa%(f%)>zgw) OR (spieler=1 AND fg%>47 AND wa%(f%)>zgw)) THEN
a: IF (zy MOD 13<>0) THEN
zy=zy-1:GOSUB mapr:Zeigerset zx,zy,bldnr
ELSE
zy=zy-1:GOSUB mapr:bldnr=bldnr+3:Mapon bldnr
END IF
END IF
END IF
IF k$=CHR$(29) AND zy<38 THEN
DigiSound "Schritt",428,0
fg%=fig%(zx,zy+1):sr%=spar%(zx,zy+1)
IF (bi%(f%)=6 OR bi%(f%)=15) AND sr%<>4 AND (fg%=0 OR (spieler=0 AND fg%<48 AND wa%(f%)>zgw) OR (spieler=1 AND fg%>47 AND wa%(f%)>zgw)) THEN b
IF (bi%(f%)=5 OR bi%(f%)=14) AND (sr%=4 OR sr%=6) AND wa%(f%)>zgw THEN b
IF (bi%(f%)=8 OR bi%(f%)=17) AND sr%<>3 AND bgl=1 THEN
zgw=0:zx=zxalt:zy=zyalt:bgl=0
IF mpjn=0 THEN Zeigerset zx,zy,bldnr :ELSE Mapon bldnralt:bldnr=bldnralt:mpjn=0:PUT ((zx MOD 13)*35+180,(zy MOD 13)*18+1),ob%(0,bi%(fig%(zx,zy))),PRESET
GOTO E
END IF
IF (bi%(f%)=8 OR bi%(f%)=17) AND sr%=3 AND wa%(f%)>zgw THEN b
IF sr%<>1 AND sr%<>3 AND sr%<>4 AND (fg%=0 OR (spieler=0 AND fg%<48 AND wa%(f%)>zgw) OR (spieler=1 AND fg%>47 AND wa%(f%)>zgw)) THEN
b: IF ((zy+1) MOD 13<>0) THEN
zy=zy+1:GOSUB mapr:Zeigerset zx,zy,bldnr
ELSE
zy=zy+1:GOSUB mapr:bldnr=bldnr-3:Mapon bldnr
END IF
END IF
END IF
IF k$=CHR$(30) AND zx<38 THEN
DigiSound "Schritt",428,0
fg%=fig%(zx+1,zy):sr%=spar%(zx+1,zy)
IF (bi%(f%)=6 OR bi%(f%)=15) AND sr%<>4 AND (fg%=0 OR (spieler=0 AND fg%<48 AND wa%(f%)>zgw) OR (spieler=1 AND fg%>47 AND wa%(f%)>zgw)) THEN c
IF (bi%(f%)=5 OR bi%(f%)=14) AND (sr%=4 OR sr%=6) AND wa%(f%)>zgw THEN c
IF (bi%(f%)=8 OR bi%(f%)=17) AND sr%<>3 AND bgl=1 THEN
zgw=0:zx=zxalt:zy=zyalt:bgl=0
IF mpjn=0 THEN Zeigerset zx,zy,bldnr :ELSE Mapon bldnralt:bldnr=bldnralt:mpjn=0:PUT ((zx MOD 13)*35+180,(zy MOD 13)*18+1),ob%(0,bi%(fig%(zx,zy))),PRESET
GOTO E
END IF
IF (bi%(f%)=8 OR bi%(f%)=17) AND sr%=3 AND wa%(f%)>zgw THEN c
IF sr%<>1 AND sr%<>3 AND sr%<>4 AND (fg%=0 OR (spieler=0 AND fg%<48 AND wa%(f%)>zgw) OR (spieler=1 AND fg%>47 AND wa%(f%)>zgw)) THEN
c: IF ((zx+1) MOD 13<>0) THEN
zx=zx+1:GOSUB mapr:Zeigerset zx,zy,bldnr
ELSE
zx=zx+1:GOSUB mapr:bldnr=bldnr+1:Mapon bldnr
END IF
END IF
END IF
IF k$=CHR$(31) AND zx>0 THEN
DigiSound "Schritt",428,0
fg%=fig%(zx-1,zy):sr%=spar%(zx-1,zy)
IF (bi%(f%)=6 OR bi%(f%)=15) AND sr%<>4 AND (fg%=0 OR (spieler=0 AND fg%<48 AND wa%(f%)>zgw) OR (spieler=1 AND fg%>47 AND wa%(f%)>zgw)) THEN d
IF (bi%(f%)=5 OR bi%(f%)=14) AND (sr%=4 OR sr%=6) AND wa%(f%)>zgw THEN d
IF (bi%(f%)=8 OR bi%(f%)=17) AND sr%<>3 AND bgl=1 THEN
zgw=0:zx=zxalt:zy=zyalt:bgl=0
IF mpjn=0 THEN Zeigerset zx,zy,bldnr :ELSE Mapon bldnralt:bldnr=bldnralt:mpjn=0:PUT ((zx MOD 13)*35+180,(zy MOD 13)*18+1),ob%(0,bi%(fig%(zx,zy))),PRESET
GOTO E
END IF
IF (bi%(f%)=8 OR bi%(f%)=17) AND sr%=3 AND wa%(f%)>zgw THEN d
IF sr%<>1 AND sr%<>3 AND sr%<>4 AND (fg%=0 OR (spieler=0 AND fg%<48 AND wa%(f%)>zgw) OR (spieler=1 AND fg%>47 AND wa%(f%)>zgw)) THEN
d: IF (zx MOD 13<>0) THEN
zx=zx-1:GOSUB mapr:Zeigerset zx,zy,bldnr
ELSE
zx=zx-1:GOSUB mapr:bldnr=bldnr-1:Mapon bldnr
END IF
END IF
END IF
IF UCASE$(k$)="F" AND fig%(zx,zy)=0 THEN
fg%=fig%(zxalt,zyalt):sr%=spar%(zx,zy)
IF (bi%(fg%)=5 OR bi%(fg%)=14) THEN
DigiSound "Sturz",428,0
IF sr%=6 OR sr%=4 THEN
beweg%(fg%)=beweg%(fg%)+1:tza=tza+1
spar%(zx,zy)=0
IF sr%=6 AND zx>17 AND zx<21 THEN spar%(zx,zy)=1
END IF
END IF
PUT ((zx MOD 13)*35+180,(zy MOD 13)*18+1),ob%(0,spar%(zx,zy)+18),PSET
IF mpjn=1 THEN zx=zxalt:zy=zyalt:Mapon bldnralt:bldnr=bldnralt:mpjn=0:bgl=0
PUT ((zxalt MOD 13)*35+180,(zyalt MOD 13)*18+1),ob%(0,bi%(fig%(zxalt,zyalt))),PSET
GOSUB groclear
RETURN
END IF
IF UCASE$(k$)="S" AND fig%(zx,zy)=0 THEN
fg%=fig%(zxalt,zyalt):sr%=spar%(zx,zy)
IF (bi%(fg%)=8 OR bi%(fg%)=17) AND sr%=3 AND st%(fg%)>8 THEN
DigiSound "Zauber",428,0
spar%(zx,zy)=0
PUT ((zx MOD 13)*35+180,(zy MOD 13)*18+1),ob%(0,18),PSET
st%(fg%)=st%(fg%)-8
beweg%(fg%)=beweg%(fg%)+1
END IF
bgl=0
IF mpjn=1 THEN zx=zxalt:zy=zyalt:Mapon bldnralt:bldnr=bldnralt:mpjn=0
PUT ((zxalt MOD 13)*35+180,(zyalt MOD 13)*18+1),ob%(0,bi%(fig%(zxalt,zyalt))),PSET
GOSUB groclear
RETURN
END IF
GOTO tsabfr
mapr:
IF NOT (bi%(f%)=6 OR bi%(f%)=15) AND spar%(zx,zy)=2 THEN zgw=zgw+1
IF NOT (bi%(f%)=6 OR bi%(f%)=15) AND spar%(zx,zy)=5 THEN zgw=zgw+2
IF (bi%(f%)<>8 AND bi%(f%)<>17) OR ((bi%(f%)=8 OR bi%(f%)=17) AND spar%(zx,zy)<>3) THEN zgw=zgw+1 :ELSE bgl=1
mclr 16,15:LOCATE 17,14
IF zgw>=ma%(f%) THEN
Shadow " 0",9,1,9,0,0,0
ELSE
Shadow STR$(ma%(f%)-zgw),9,1,9,0,0,0
END IF
IF (spieler=0 AND fig%(zx,zy)<48 AND fig%(zx,zy)>0) OR (spieler=1 AND fig%(zx,zy)>47) THEN